package cn.rongdao.jrkabao.util;

import android.app.Activity;
import android.content.Context;
import android.os.Build;

import com.igexin.sdk.PushManager;
import com.mifengkong.frtools.util.FRDeviceUtil;
import com.mifengkong.frtools.util.FRDisplayMetrics;
import com.mifengkong.frtools.util.FRSharedPreferences;
import com.mifengkong.frtools.util.FRString;

import java.util.HashMap;
import java.util.Map;

import cn.mifengkong.appcommon.constant.AppCommonConstant;
import cn.rongdao.jrkabao.R;
import cn.rongdao.jrkabao.bean.remind.RemindBean;
import cn.rongdao.jrkabao.constant.SPConstant;
import cn.rongdao.jrkabao.dao.UserDao;

/**
 * Created by jack on 2018/4/23
 */

public class GetDefaultDataUtil {

    public static RemindBean.RemindBankList getExampleBean() {
        RemindBean.RemindBankList remindBean = new RemindBean.RemindBankList();
        remindBean.setId("");
        remindBean.setAmount_left("10000.00");
        remindBean.setBalance("10000.00");
        remindBean.setBank_icon("http://mifengkong.oss-cn-shenzhen.aliyuncs.com/kamao/bank/SPD.png");
        remindBean.setBank_name("浦发银行");
        remindBean.setBankcard_no("1234");
        remindBean.setBalance_min("10000.00");
        remindBean.setButton_status("0");
        remindBean.setAmount_status("0");
        remindBean.setBill_status("0");
        remindBean.setRepay_day_status("0");
        remindBean.setBank_name_status("0");
        remindBean.setBankcard_no_status("0");
        remindBean.setUser_name_status("0");
        remindBean.setFree("20");
        remindBean.setBill_day("24");
        remindBean.setRepay_day("8");
        remindBean.setLeft_day("20");
        remindBean.setIs_export("1");
        remindBean.setBill_status("1");
        remindBean.setText("还款日:12.01");
        remindBean.setUser_name("张三");
        remindBean.setAmount("10000");
        remindBean.setExample(true);
        return remindBean;
    }

    public static Map<String, Object> getMoXieContent(Activity activity) {
        Map<String, Object> hashMap = new HashMap<>();
        hashMap.put(AppCommonConstant.USER_ID, UserDao.getInstance().getUserId());
        hashMap.put(AppCommonConstant.ID_CARD, FRSharedPreferences.getStringDefault(SPConstant.ID_CARD, ""));
        hashMap.put(AppCommonConstant.NAME, FRSharedPreferences.getStringDefault(SPConstant.NAME, ""));
        hashMap.put(AppCommonConstant.MOXIE_BANNER_BG, activity.getResources().getColor(R.color.colorPrimary));
        hashMap.put(AppCommonConstant.MOXIE_TEXT_COLOR, activity.getResources().getColor(R.color.white));
        hashMap.put(AppCommonConstant.MOXIE_THEME_COLOR, FRDisplayMetrics.hexColor(R.color.colorPrimary));
        hashMap.put(AppCommonConstant.MOXIE_IMMERSED_ENABLE, false);
        return hashMap;
    }

    public static Map<String, String> getDefaultUserInfo(Context context) {
        Map<String, String> hashMap = new HashMap<>();
        hashMap.put("cid", "1234");
        hashMap.put("app_name", context.getResources().getString(R.string.app_name));
        hashMap.put("net_info", NetWorkUtil.getCurrentNetworkType());
        hashMap.put("dev_no", FRDeviceUtil.getPhoneModels());
        hashMap.put("client_id", FRString.valueOf(PushManager.getInstance().getClientid(context)));
        hashMap.put("dev_sys", String.valueOf(Build.VERSION.SDK_INT));
        return hashMap;
    }
}